# $Id: PKGBUILD 175931 2013-01-25 04:44:59Z eric $
# Maintainer:
# Contributor: Dale Blount <dale@archlinux.org>
# Contributor: Francois Charette <francois.archlinux.org>

pkgname=perl-netaddr-ip
_realname=NetAddr-IP
pkgver=4.066
pkgrel=1
pkgdesc="Perl module to manage IP addresses and subnets"
arch=(i686 x86_64)
license=('PerlArtistic' 'GPL')
depends=('perl')
options=('!emptydirs')
url="http://search.cpan.org/dist/${_realname}/"
source=(http://search.cpan.org/CPAN/authors/id/M/MI/MIKER/${_realname}-${pkgver}.tar.gz)
md5sums=('7c6cf77d3c02fa0baf77b6a97f2a670a')

build() {
  cd "${srcdir}/${_realname}-${pkgver}"
  # install module in vendor directories.
  perl Makefile.PL INSTALLDIRS=vendor
  make
}

check() {
  cd "${srcdir}/${_realname}-${pkgver}"
  make test
}

package() {
  cd "${srcdir}/${_realname}-${pkgver}"
  make DESTDIR="${pkgdir}" install
}
